\(\int \csc ^4(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx\) [1463]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 164 \[ \int \csc ^4(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {9 a^2 b \text {arctanh}(\cos (c+d x))}{2 d}-\frac {b^3 \text {arctanh}(\cos (c+d x))}{d}-\frac {2 a^3 \cot (c+d x)}{d}-\frac {3 a b^2 \cot (c+d x)}{d}-\frac {a^3 \cot ^3(c+d x)}{3 d}+\frac {9 a^2 b \sec (c+d x)}{2 d}+\frac {b^3 \sec (c+d x)}{d}-\frac {3 a^2 b \csc ^2(c+d x) \sec (c+d x)}{2 d}+\frac {a^3 \tan (c+d x)}{d}+\frac {3 a b^2 \tan (c+d x)}{d} \]

[Out]

-9/2*a^2*b*arctanh(cos(d*x+c))/d-b^3*arctanh(cos(d*x+c))/d-2*a^3*cot(d*x+c)/d-3*a*b^2*cot(d*x+c)/d-1/3*a^3*cot
(d*x+c)^3/d+9/2*a^2*b*sec(d*x+c)/d+b^3*sec(d*x+c)/d-3/2*a^2*b*csc(d*x+c)^2*sec(d*x+c)/d+a^3*tan(d*x+c)/d+3*a*b
^2*tan(d*x+c)/d

Rubi [A] (verified)

Time = 0.18 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {2991, 2702, 327, 213, 2700, 14, 294, 276} \[ \int \csc ^4(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {a^3 \tan (c+d x)}{d}-\frac {a^3 \cot ^3(c+d x)}{3 d}-\frac {2 a^3 \cot (c+d x)}{d}-\frac {9 a^2 b \text {arctanh}(\cos (c+d x))}{2 d}+\frac {9 a^2 b \sec (c+d x)}{2 d}-\frac {3 a^2 b \csc ^2(c+d x) \sec (c+d x)}{2 d}+\frac {3 a b^2 \tan (c+d x)}{d}-\frac {3 a b^2 \cot (c+d x)}{d}-\frac {b^3 \text {arctanh}(\cos (c+d x))}{d}+\frac {b^3 \sec (c+d x)}{d} \]

[In]

Int[Csc[c + d*x]^4*Sec[c + d*x]^2*(a + b*Sin[c + d*x])^3,x]

[Out]

(-9*a^2*b*ArcTanh[Cos[c + d*x]])/(2*d) - (b^3*ArcTanh[Cos[c + d*x]])/d - (2*a^3*Cot[c + d*x])/d - (3*a*b^2*Cot
[c + d*x])/d - (a^3*Cot[c + d*x]^3)/(3*d) + (9*a^2*b*Sec[c + d*x])/(2*d) + (b^3*Sec[c + d*x])/d - (3*a^2*b*Csc
[c + d*x]^2*Sec[c + d*x])/(2*d) + (a^3*Tan[c + d*x])/d + (3*a*b^2*Tan[c + d*x])/d

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2700

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rule 2702

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 2991

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && NeQ[a^2 - b^2, 0] && IntegerQ[m] && (GtQ[m, 0] || IntegerQ[n])

Rubi steps \begin{align*} \text {integral}& = \int \left (b^3 \csc (c+d x) \sec ^2(c+d x)+3 a b^2 \csc ^2(c+d x) \sec ^2(c+d x)+3 a^2 b \csc ^3(c+d x) \sec ^2(c+d x)+a^3 \csc ^4(c+d x) \sec ^2(c+d x)\right ) \, dx \\ & = a^3 \int \csc ^4(c+d x) \sec ^2(c+d x) \, dx+\left (3 a^2 b\right ) \int \csc ^3(c+d x) \sec ^2(c+d x) \, dx+\left (3 a b^2\right ) \int \csc ^2(c+d x) \sec ^2(c+d x) \, dx+b^3 \int \csc (c+d x) \sec ^2(c+d x) \, dx \\ & = \frac {a^3 \text {Subst}\left (\int \frac {\left (1+x^2\right )^2}{x^4} \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left (3 a^2 b\right ) \text {Subst}\left (\int \frac {x^4}{\left (-1+x^2\right )^2} \, dx,x,\sec (c+d x)\right )}{d}+\frac {\left (3 a b^2\right ) \text {Subst}\left (\int \frac {1+x^2}{x^2} \, dx,x,\tan (c+d x)\right )}{d}+\frac {b^3 \text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d} \\ & = \frac {b^3 \sec (c+d x)}{d}-\frac {3 a^2 b \csc ^2(c+d x) \sec (c+d x)}{2 d}+\frac {a^3 \text {Subst}\left (\int \left (1+\frac {1}{x^4}+\frac {2}{x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left (9 a^2 b\right ) \text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{2 d}+\frac {\left (3 a b^2\right ) \text {Subst}\left (\int \left (1+\frac {1}{x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}+\frac {b^3 \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d} \\ & = -\frac {b^3 \text {arctanh}(\cos (c+d x))}{d}-\frac {2 a^3 \cot (c+d x)}{d}-\frac {3 a b^2 \cot (c+d x)}{d}-\frac {a^3 \cot ^3(c+d x)}{3 d}+\frac {9 a^2 b \sec (c+d x)}{2 d}+\frac {b^3 \sec (c+d x)}{d}-\frac {3 a^2 b \csc ^2(c+d x) \sec (c+d x)}{2 d}+\frac {a^3 \tan (c+d x)}{d}+\frac {3 a b^2 \tan (c+d x)}{d}+\frac {\left (9 a^2 b\right ) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{2 d} \\ & = -\frac {9 a^2 b \text {arctanh}(\cos (c+d x))}{2 d}-\frac {b^3 \text {arctanh}(\cos (c+d x))}{d}-\frac {2 a^3 \cot (c+d x)}{d}-\frac {3 a b^2 \cot (c+d x)}{d}-\frac {a^3 \cot ^3(c+d x)}{3 d}+\frac {9 a^2 b \sec (c+d x)}{2 d}+\frac {b^3 \sec (c+d x)}{d}-\frac {3 a^2 b \csc ^2(c+d x) \sec (c+d x)}{2 d}+\frac {a^3 \tan (c+d x)}{d}+\frac {3 a b^2 \tan (c+d x)}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.71 (sec) , antiderivative size = 287, normalized size of antiderivative = 1.75 \[ \int \csc ^4(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {\csc ^5\left (\frac {1}{2} (c+d x)\right ) \sec ^3\left (\frac {1}{2} (c+d x)\right ) \left (-8 \left (4 a^3+9 a b^2\right ) \cos (2 (c+d x))+4 \left (4 a^3+9 a b^2\right ) \cos (4 (c+d x))+3 b \left (12 a b+6 \left (5 a^2+2 b^2\right ) \sin (c+d x)-2 \left (9 a^2+2 b^2\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sin (2 (c+d x))-18 a^2 \sin (3 (c+d x))-4 b^2 \sin (3 (c+d x))+9 a^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin (4 (c+d x))+2 b^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin (4 (c+d x))-9 a^2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (4 (c+d x))-2 b^2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (4 (c+d x))\right )\right )}{384 d \left (-1+\cot ^2\left (\frac {1}{2} (c+d x)\right )\right )} \]

[In]

Integrate[Csc[c + d*x]^4*Sec[c + d*x]^2*(a + b*Sin[c + d*x])^3,x]

[Out]

(Csc[(c + d*x)/2]^5*Sec[(c + d*x)/2]^3*(-8*(4*a^3 + 9*a*b^2)*Cos[2*(c + d*x)] + 4*(4*a^3 + 9*a*b^2)*Cos[4*(c +
 d*x)] + 3*b*(12*a*b + 6*(5*a^2 + 2*b^2)*Sin[c + d*x] - 2*(9*a^2 + 2*b^2)*(Log[Cos[(c + d*x)/2]] - Log[Sin[(c
+ d*x)/2]])*Sin[2*(c + d*x)] - 18*a^2*Sin[3*(c + d*x)] - 4*b^2*Sin[3*(c + d*x)] + 9*a^2*Log[Cos[(c + d*x)/2]]*
Sin[4*(c + d*x)] + 2*b^2*Log[Cos[(c + d*x)/2]]*Sin[4*(c + d*x)] - 9*a^2*Log[Sin[(c + d*x)/2]]*Sin[4*(c + d*x)]
 - 2*b^2*Log[Sin[(c + d*x)/2]]*Sin[4*(c + d*x)])))/(384*d*(-1 + Cot[(c + d*x)/2]^2))

Maple [A] (verified)

Time = 0.85 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.03

method result size
derivativedivides \(\frac {a^{3} \left (-\frac {1}{3 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {4}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {8 \cot \left (d x +c \right )}{3}\right )+3 a^{2} b \left (-\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {3}{2 \cos \left (d x +c \right )}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+3 a \,b^{2} \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+b^{3} \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) \(169\)
default \(\frac {a^{3} \left (-\frac {1}{3 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {4}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {8 \cot \left (d x +c \right )}{3}\right )+3 a^{2} b \left (-\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {3}{2 \cos \left (d x +c \right )}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+3 a \,b^{2} \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+b^{3} \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) \(169\)
parallelrisch \(\frac {108 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (a^{2}+\frac {2 b^{2}}{9}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+9 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2} b +\left (20 a^{3}+36 a \,b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-90 a^{3}-216 a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+9 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2} b +\left (20 a^{3}+36 a \,b^{2}\right ) \cot \left (\frac {d x}{2}+\frac {c}{2}\right )-162 a^{2} b -48 b^{3}}{24 d \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-24 d}\) \(210\)
risch \(\frac {27 a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}+6 b^{3} {\mathrm e}^{7 i \left (d x +c \right )}-36 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-45 a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}-18 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}+32 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}+72 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+45 a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}+18 b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-16 i a^{3}-36 i a \,b^{2}-27 a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}-6 b^{3} {\mathrm e}^{i \left (d x +c \right )}}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {9 a^{2} b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {9 a^{2} b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}\) \(291\)
norman \(\frac {\frac {a^{3}}{24 d}+\frac {a^{3} \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-\frac {\left (9 a^{2} b +4 b^{3}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {\left (63 a^{2} b +16 b^{3}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {\left (135 a^{2} b +48 b^{3}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {9 a \left (a^{2}+4 b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {9 a \left (a^{2}+4 b^{2}\right ) \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {21 a \left (3 a^{2}+8 b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {21 a \left (3 a^{2}+8 b^{2}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {a \left (23 a^{2}+36 b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {a \left (23 a^{2}+36 b^{2}\right ) \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {3 a^{2} b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}+\frac {3 a^{2} b \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {3 b \left (13 a^{2}+4 b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {b \left (9 a^{2}+2 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}\) \(413\)

[In]

int(csc(d*x+c)^4*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^3*(-1/3/sin(d*x+c)^3/cos(d*x+c)+4/3/sin(d*x+c)/cos(d*x+c)-8/3*cot(d*x+c))+3*a^2*b*(-1/2/sin(d*x+c)^2/co
s(d*x+c)+3/2/cos(d*x+c)+3/2*ln(csc(d*x+c)-cot(d*x+c)))+3*a*b^2*(1/sin(d*x+c)/cos(d*x+c)-2*cot(d*x+c))+b^3*(1/c
os(d*x+c)+ln(csc(d*x+c)-cot(d*x+c))))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.54 \[ \int \csc ^4(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {8 \, {\left (4 \, a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{4} + 12 \, a^{3} + 36 \, a b^{2} - 12 \, {\left (4 \, a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left ({\left (9 \, a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{3} - {\left (9 \, a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 3 \, {\left ({\left (9 \, a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{3} - {\left (9 \, a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 6 \, {\left (6 \, a^{2} b + 2 \, b^{3} - {\left (9 \, a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{12 \, {\left (d \cos \left (d x + c\right )^{3} - d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )} \]

[In]

integrate(csc(d*x+c)^4*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/12*(8*(4*a^3 + 9*a*b^2)*cos(d*x + c)^4 + 12*a^3 + 36*a*b^2 - 12*(4*a^3 + 9*a*b^2)*cos(d*x + c)^2 + 3*((9*a^
2*b + 2*b^3)*cos(d*x + c)^3 - (9*a^2*b + 2*b^3)*cos(d*x + c))*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 3*((9
*a^2*b + 2*b^3)*cos(d*x + c)^3 - (9*a^2*b + 2*b^3)*cos(d*x + c))*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 6
*(6*a^2*b + 2*b^3 - (9*a^2*b + 2*b^3)*cos(d*x + c)^2)*sin(d*x + c))/((d*cos(d*x + c)^3 - d*cos(d*x + c))*sin(d
*x + c))

Sympy [F(-1)]

Timed out. \[ \int \csc ^4(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\text {Timed out} \]

[In]

integrate(csc(d*x+c)**4*sec(d*x+c)**2*(a+b*sin(d*x+c))**3,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.99 \[ \int \csc ^4(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {9 \, a^{2} b {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{2} - 2\right )}}{\cos \left (d x + c\right )^{3} - \cos \left (d x + c\right )} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + 6 \, b^{3} {\left (\frac {2}{\cos \left (d x + c\right )} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 36 \, a b^{2} {\left (\frac {1}{\tan \left (d x + c\right )} - \tan \left (d x + c\right )\right )} - 4 \, a^{3} {\left (\frac {6 \, \tan \left (d x + c\right )^{2} + 1}{\tan \left (d x + c\right )^{3}} - 3 \, \tan \left (d x + c\right )\right )}}{12 \, d} \]

[In]

integrate(csc(d*x+c)^4*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

1/12*(9*a^2*b*(2*(3*cos(d*x + c)^2 - 2)/(cos(d*x + c)^3 - cos(d*x + c)) - 3*log(cos(d*x + c) + 1) + 3*log(cos(
d*x + c) - 1)) + 6*b^3*(2/cos(d*x + c) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) - 36*a*b^2*(1/tan(d*x
+ c) - tan(d*x + c)) - 4*a^3*((6*tan(d*x + c)^2 + 1)/tan(d*x + c)^3 - 3*tan(d*x + c)))/d

Giac [A] (verification not implemented)

none

Time = 0.52 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.49 \[ \int \csc ^4(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 21 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 36 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 12 \, {\left (9 \, a^{2} b + 2 \, b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {48 \, {\left (a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{2} b + b^{3}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} - \frac {198 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 44 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 21 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 36 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 9 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}}{24 \, d} \]

[In]

integrate(csc(d*x+c)^4*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

1/24*(a^3*tan(1/2*d*x + 1/2*c)^3 + 9*a^2*b*tan(1/2*d*x + 1/2*c)^2 + 21*a^3*tan(1/2*d*x + 1/2*c) + 36*a*b^2*tan
(1/2*d*x + 1/2*c) + 12*(9*a^2*b + 2*b^3)*log(abs(tan(1/2*d*x + 1/2*c))) - 48*(a^3*tan(1/2*d*x + 1/2*c) + 3*a*b
^2*tan(1/2*d*x + 1/2*c) + 3*a^2*b + b^3)/(tan(1/2*d*x + 1/2*c)^2 - 1) - (198*a^2*b*tan(1/2*d*x + 1/2*c)^3 + 44
*b^3*tan(1/2*d*x + 1/2*c)^3 + 21*a^3*tan(1/2*d*x + 1/2*c)^2 + 36*a*b^2*tan(1/2*d*x + 1/2*c)^2 + 9*a^2*b*tan(1/
2*d*x + 1/2*c) + a^3)/tan(1/2*d*x + 1/2*c)^3)/d

Mupad [B] (verification not implemented)

Time = 11.13 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.33 \[ \int \csc ^4(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (\frac {9\,a^2\,b}{2}+b^3\right )}{d}+\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {20\,a^3}{3}+12\,a\,b^2\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (23\,a^3+60\,a\,b^2\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (51\,a^2\,b+16\,b^3\right )+\frac {a^3}{3}+3\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\right )}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {7\,a^3}{8}+\frac {3\,a\,b^2}{2}\right )}{d}+\frac {3\,a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d} \]

[In]

int((a + b*sin(c + d*x))^3/(cos(c + d*x)^2*sin(c + d*x)^4),x)

[Out]

(log(tan(c/2 + (d*x)/2))*((9*a^2*b)/2 + b^3))/d + (a^3*tan(c/2 + (d*x)/2)^3)/(24*d) - (tan(c/2 + (d*x)/2)^2*(1
2*a*b^2 + (20*a^3)/3) - tan(c/2 + (d*x)/2)^4*(60*a*b^2 + 23*a^3) - tan(c/2 + (d*x)/2)^3*(51*a^2*b + 16*b^3) +
a^3/3 + 3*a^2*b*tan(c/2 + (d*x)/2))/(d*(8*tan(c/2 + (d*x)/2)^3 - 8*tan(c/2 + (d*x)/2)^5)) + (tan(c/2 + (d*x)/2
)*((3*a*b^2)/2 + (7*a^3)/8))/d + (3*a^2*b*tan(c/2 + (d*x)/2)^2)/(8*d)